package light.head.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 文件信息
 * @author Jian
 */
@Entity
@Table
public class FileInfo implements Serializable {
	
	private static final long serialVersionUID = 2312145458476437000L;
	
	
	private Integer code;
	private String name;
	private String uuid;							// 系统生成的文件名
	private String ext;								// 后缀名
	private Integer cu;								// 上传用户流水号
	private Date ct = new Date();					// 上传时间
	private Byte type;								// 文件类型：1.文件，2.图片
	private String module;							// 模块名，例如：商品为commodity，该名称定义了文件在upload下的哪个文件夹中
	private Boolean deleted;						// 是否删除，该标志用于限制用户上传文件总大小
	private Integer size;							// 文件大小
	private Integer oc;								// 该文件所属机构
	private Integer mc;								// 任务编号
	





	

	

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column
	public Integer getCode() {
		return code;
	}
	@Column(length = 50)
	public String getName() {
		return name;
	}
	@Column(length = 32)
	public String getUuid() {
		return uuid;
	}
	@Column(length = 5)
	public String getExt() {
		return ext;
	}
	@Column
	public Integer getCu() {
		return cu;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(updatable = false, nullable = false)
	public Date getCt() {
		return ct;
	}
	@Column
	public Byte getType() {
		return type;
	}
	@Column(length = 20)
	public String getModule() {
		return module;
	}
	@Column
	public Boolean getDeleted() {
		return deleted;
	}
	@Column
	public Integer getSize() {
		return size;
	}
	@Column
	public Integer getOc() {
		return oc;
	}
	@Column
	public Integer getMc() {
		return mc;
	}
	
	
	
	
	
	
	

	public void setCode(Integer code) {
		this.code = code;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	public void setExt(String ext) {
		this.ext = ext;
	}
	public void setCu(Integer cu) {
		this.cu = cu;
	}
	public void setType(Byte type) {
		this.type = type;
	}
	public void setCt(Date ct) {
		this.ct = ct;
	}
	public void setModule(String module) {
		this.module = module;
	}
	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}
	public void setSize(Integer size) {
		this.size = size;
	}
	public void setOc(Integer oc) {
		this.oc = oc;
	}
	public void setMc(Integer mc) {
		this.mc = mc;
	}
}
